import os

from pathlib import Path

DCA = "dollar_cost_averaging"
MA = "moving_average"
DROP = "drop"

ENDPOINT = 'endpoint'
DESC = 'description'
DEFAULT_PARAMS = 'default_params'
DYNAMIC_PARAMS = 'dynamic_params'

HISTORY_SLEEP_TIME = 1
REALTIME_SLEEP_TIME = 1

INPUT_DIR = Path(__file__).resolve().parent / 'data' / 'input'

LONG_TERM_FUND_YML_LIST = [str(i) for i in (INPUT_DIR / 'long_term.yml',
                                            INPUT_DIR / 'pure_bond.yml')]

MY_PREFER_FUND_YML_LIST = [str(i) for i in (INPUT_DIR / 'my_prefer.yml',
                                            INPUT_DIR / 'long_term.yml',
                                            INPUT_DIR / 'pure_bond.yml')]

MY_FUND_YML = INPUT_DIR / 'my_prefer.yml'

TEST_SINGLE_YML_LIST = [str(i) for i in (INPUT_DIR / 'test_single.yml',)]

MA_DAYS_LIST = [30, 60, 90]
DEFAULT_MA_DAYS = 60


OUTPUT_DIR = Path(__file__).resolve().parent / 'data' / 'output'


EVALUATION_RESULT_DIR = OUTPUT_DIR / 'evaluation_results'
os.makedirs(EVALUATION_RESULT_DIR, exist_ok=True)

HISTORY_DIR = OUTPUT_DIR / 'history_data'
os.makedirs(HISTORY_DIR, exist_ok=True)

BACKTEST_DIR = OUTPUT_DIR / 'backtest_data'
os.makedirs(BACKTEST_DIR, exist_ok=True)


# 定义数据文件路径
MARKET_SENTIMENT_CSV = OUTPUT_DIR / "market_sentiment.csv"